package com.xayy.ha.gen.lite.config;

import com.xayy.ha.gen.lite.util.YamlPropertyFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhoutanxin@gmail.com
 * @date 2022/7/30 22:52
 */
@Component
@ConfigurationProperties(prefix = "generator")
@PropertySource(value = "classpath:application.yml", factory = YamlPropertyFactory.class)
@Data
public class GenerateConfig {
    public String packageNamePre;
    //模块名称
    public String moduleName ;
    //表
    public String tableName;
    //是否下划线转驼峰
    public boolean toCamelCase;
    //实体类名称
    public String entityName;
    //主键ID
    public String primaryId;
    //作者
    public String authorName;
    //数据库名称
    public String databaseName;
    //数据库服务器IP地址
    public String ipName;
    //数据库服务器端口
    public String portName;
    //用户名
    public String userName;
    //密码
    public String passWord;
    //模板路径
    public String templatePath;
    //文件输出路径，支持自定义输出路径，如果为空，默认取当前工程的src/main/java路径
    public String outUrl;
    //排除字段
    public String excludeField;
    // 类型映射
    private List<JavaTypeMapper> typeMapperConfig;
}
